using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlatRedBall;
using FlatRedBall.Input;
using FlatRedBall.Graphics;
using FlatRedBall.AI.Pathfinding;
using FlatRedBall.Graphics.Animation;
using FlatRedBall.Graphics.Particle;
using FlatRedBall.Math.Geometry;
using FlatRedBall.Math.Splines;
using FlatRedBall.Gui;

#if FRB_XNA || SILVERLIGHT
using Keys = Microsoft.Xna.Framework.Input.Keys;
using Vector3 = Microsoft.Xna.Framework.Vector3;
using Texture2D = Microsoft.Xna.Framework.Graphics.Texture2D;
#endif

namespace WinRos_Xna.Screens
{
	public partial class IPscreen
	{
        Text text;
        Text theIp;
        Text note = TextManager.AddText("");

        Xbox360GamePad controller1 = InputManager.Xbox360GamePads[0];
        Keyboard keyboard = InputManager.Keyboard;
		public void CustomInitialize()
		{
            //SpriteManager.Camera.BackgroundColor = Microsoft.Xna.Framework.Graphics.Color.CornflowerBlue;

            text = TextManager.AddText("IP Address followed by enter: ");

            text.X = -10;
            //text.DisplayText += InputManager.Keyboard.GetStringTyped();
            theIp = TextManager.AddText("");
            note.DisplayText = "*NOTE: Defualt will be used if IP is not known";
            note.Y = SpriteManager.Camera.AbsoluteBottomYEdgeAt(0) + 1;
            note.X = -10;
        }

		public void CustomActivity(bool firstTimeCalled)
		{


            text.DisplayText += "";
            theIp.DisplayText += InputManager.Keyboard.GetStringTyped();
            if (InputManager.Keyboard.KeyPushed(Keys.Enter))
            {
                GlobalData.ipaddress = theIp.DisplayText;
                //text.DisplayText = "";
                Console.WriteLine("The text is as follows");
                Console.WriteLine(GlobalData.ipaddress);
                MoveToScreen(typeof(WinRos_Xna.Screens.chooseScreen).FullName);
            }
		}

		public void CustomDestroy()
		{
            TextManager.RemoveText(text);
            TextManager.RemoveText(theIp);
            TextManager.RemoveText(note);

		}

        private static void CustomLoadStaticContent(string contentManagerName)
        {


        }

	}
}
